function GetAnalyze_Policy_Other() {

	var myData = [
			['1','策略1', '设备1','inside','GigabitEthernet0/0<br>GigabitEthernet0/1','申请单', '192.168.1.1','tcp','192.168.2.1','inside',"2012-10-01 10:00:00","2012-10-01 17:00:00","OA","2","admin",'拒绝'],
			['2','策略2', '设备1','inside','GigabitEthernet0/0<br>GigabitEthernet0/1','历史记录', '192.168.1.2','tcp','192.168.2.2','outside',"","","ERP","5","admin",'允许'],
			['3','策略3', '设备2','outside','GigabitEthernet0/2<br>GigabitEthernet0/3','申请单', '192.168.1.3','udp','192.168.2.3','ethernet0/1',"2012-10-01 10:00:00","2012-10-01 17:00:00","FTP","3","admin",'允许'],
			['4','策略4', '设备2','outside','GigabitEthernet0/2<br>GigabitEthernet0/3','历史记录', '192.168.1.4','tcp','192.168.2.4','outside',"","","MYSQL","0","admin",'拒绝'],
			['5','策略5', '设备3','DMZ','GigabitEthernet0/4','申请单', '192.168.1.5','udp','192.168.2.5','inside',"2012-10-01 10:00:00","2012-10-01 17:00:00","OA","3","admin",'允许']
	];



		
   // shared reader
    var reader = new Ext.data.ArrayReader({}, [
       			{
							name : 'id'
						}, {
							name : 'policy'
						}, {
							name : 'devices'
						}, {
							name : 'interface'
						}, {
							name : 'interface1'
						}, {
							name : 'apply'
						}, {
							name : 'sip'
						}, {
							name : 'protocol'
						}, {
							name : 'dip'
						}, {
							name : 'dport'
						}, {
							name : 'onlinetime'
						}, {
							name : 'offlinetime'
						}, {
							name : 'application'
						}, {
							name : 'hits'
						}, {
							name : 'manager'
						}, {
							name : 'action'
						}
    ]);

    var store = new Ext.data.GroupingStore({
            reader: reader,
            data: myData,
            sortInfo:{field: 'id', direction: "ASC"},
            groupField:'devices'
        });

	
	var sm = new Ext.grid.CheckboxSelectionModel();
	var grid = new Ext.grid.GridPanel({
				store : store,
				columns : [{
							id : 'id',
							header : 'id',
							width : 10,
							sortable : true,
							dataIndex : 'id',
							hidden : true
						}, {
							header : '策略',
							width : 70,
							sortable : true,
							dataIndex : 'policy'
						}, {
							header : '设备',
							width : 70,
							sortable : true,
							dataIndex : 'devices',
							hidden : true
						}, {
							header : '区域',
							width : 50,
							sortable : true,
							dataIndex : 'interface'
						}, {
							header : '接口',
							width : 100,
							sortable : true,
							dataIndex : 'interface1'
						}, {
							header : '工作类型',
							width : 70,
							sortable : true,
							dataIndex : 'apply',
							renderer:renderTopic1
						}, {
							header : '源地址',
							width : 70,
							sortable : true,
							dataIndex : 'sip'
						}, {
							header : '协议',
							width : 70,
							sortable : true,
							dataIndex : 'protocol'
						}, {
							header : '目的地址',
							width : 70,
							sortable : true,
							dataIndex : 'dip'
						}, {
							header : '目的端口',
							width : 70,
							sortable : true,
							dataIndex : 'dport'
						}, {
							header : '上线时间',
							width : 120,
							sortable : true,
							dataIndex : 'onlinetime'
						}, {
							header : '下线时间',
							width : 120,
							sortable : true,
							dataIndex : 'offlinetime'
						}, {
							header : '应用系统',
							width : 70,
							sortable : true,
							dataIndex : 'application'
						}, {
							header : '命中次数',
							width : 70,
							sortable : true,
							dataIndex : 'hits'
						}, {
							header : '负责人',
							width : 60,
							sortable : true,
							dataIndex : 'manager'
						}, {
							header : '动作',
							width : 60,
							sortable : true,
							dataIndex : 'action'
						}],
				sm : sm,
				view: new Ext.grid.GroupingView({
		            forceFit:true,
		            startCollapsed : false ,
		            groupTextTpl: '{gvalue}({[values.rs.length]} {[values.rs.length > 1 ? "条" : "条"]})'
		        }),
				
				tbar : [
						{
							text : '分析',
							tooltip : '分析',
							handler : function() {
								SetAnalyze_Policy_Other();
							}
						}],
				
				stateId : 'Analyze_Policy_Other'
			});
	function renderTopic1(value, p, record){
				if(value == '历史记录'){
					return String.format("{0}",value);
				}else{
					return String.format("<a href='javascript:void(null)' onclick='javascript:SetACLApply1();'>{0}</a>",value);
				}
    }	

	return grid;
}

function SetAnalyze_Policy_Other(setReturn){


	var set_center = {
		xtype: 'fieldset',
		margins:'5 5 5 5',
		layout : 'form',
		region:'center',
		bodyStyle : 'padding:10px;',
		items: [
						{
								xtype : 'textfield',
								fieldLabel : '源起始IP',
								id : 'sstartip',
								name : 'sstartip',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '源结束IP',
								id : 'sendip',
								name : 'sendip',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '目的起始IP',
								id : 'dstartip',
								name : 'dstartip',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '目的结束IP',
								id : 'dendip',
								name : 'dendip',
								anchor : '100%'
						},{
								xtype : 'textfield',
								fieldLabel : '目的端口',
								id : 'dport',
								name : 'dport',
								anchor : '100%'
						}
	
		]
	};

	var setWindows = new Ext.Window({
				layout : 'border',
				width : 500,
				height : 300,
				title : "分析条件",
				modal : true,
				resizable : true,
				maximizable : true,
				iconCls : 'add',
				items : [set_center],
				plain : true
				
			});
	setWindows.addButton({
				text : "应用拓扑展示",
				handler : function() {
					GetLinkApplicationTP(2);
				}
			});
	setWindows.addButton({
				text : "分析",
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.addButton({
				text : '取 消',
				handler : function() {
					setWindows.close();
				}
			});
	setWindows.show();
}

